System and method for allocating capacity

ABSTRACT

For a storage apparatus where flash memory disks and hard disks coexist, high-density mounting of flash memory modules is achieved. The storage apparatus includes flash memories and a storage controller. A second storage apparatus including magnetic disks is connected to the storage apparatus. The storage controller can form a storage area using a flash memory or a magnetic disk to create a logical volume. When an input/output request is issued from a host computer, if a storage area is formed with a flash memory, the storage controller directly accesses the flash memory to handle the request. When the storage apparatus defines a storage area formed with a flash memory, the storage apparatus defines the storage area by adding up the capacity of a storage area to be provided for the host computer and a substitute area capacity determined in consideration of restrictions on the number deletions of the flash memory.

CROSS REFERENCES TO RELATED APPLICATIONS

The present application is a continuation of application Ser. No.12/248,519, filed Oct. 9, 2008; which relates to and claims priorityfrom Japanese Patent Application No. 2008-126608, field on May 14, 2008and Japanese Application No. 2008-213464, filed Aug. 22, 2008 the entiredisclosures of which are incorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a storage apparatus employed in acomputer system. More particularly, the present invention is concernedwith a storage apparatus using a nonvolatile semiconductor memory suchas a flash memory.

2. Description of the Related Art

Generally, storage apparatuses include a randomly accessible nonvolatilestorage medium. The randomly accessible nonvolatile storage medium isfor example, a magnetic disk (which may be called a hard disk), anoptical disk, or the like. As described in, for example, a patentdocument 1, numerous hard disks are integrated.

In recent years, a storage apparatus using as a storage medium anonvolatile semiconductor memory such as a flash memory in place of theconventionally employed hard disk has attracted attention. The flashmemory has the merits that it can operate at a higher speed than thehard disk can and that the power consumption is limited. A patentdocument 2 has disclosed a technology for substituting a flash memorydisk, which includes multiple flash memories and can be accessed by anaccessing means for the conventional hard disk such as an accessingmeans conformable to the small computer system interface (SCSI)standard, for the hard disk of a storage apparatus.

Incidentally, the patent document 1 refers to JP-A-2004-5370 and thepatent document 2 refers to U.S. Pat. No. 6,529,416.

SUMMARY OF THE INVENTION

In a conceivable mode for utilizing the features of the storage mediathat are the flash memory and hard disk: when a logical device thatprovides a memory area for a host computer is requested to offer highrandom read accessibility for a large amount of data in, for example, adata warehouse, a logical device formed with a flash memory is provided;and when a cost of data retention such as archival of long-term data hasto be suppressed, a logical device formed with a hard disk is provided.Thus, preferably, one storage apparatus can provide two logical devicesformed with different storage media.

In a mode for realizing the storage apparatus, the flash memory diskdescribed in the patent document 2 is incorporated in the storageapparatus described in the patent document 1 so that the flash memorydisk and hard disk will coexist. Thus, the nonvolatile semiconductormemory such as the flash memory can be used as the storage mediumwithout the necessity of changing the SCSI accessing means to another.However, the flash memory that can be incorporated in the storageapparatus is restricted by the form for the hard disk to which the flashmemory disk conforms. This poses a problem in that high-density mountingof flash memories is harder to achieve than it is in the storageapparatus to which the flash memory is connected as it is. Moreover,since the performance of the flash memory disk depends on the peakperformance of the accessing means for the magnetic disk, even if theaccessibility of the flash memory improves, the accessibility may not beable to be fully exerted.

In order to solve the foregoing problems, a storage apparatus thatincludes an accessing means to be used to directly input or output datafrom or to a flash memory in place of the conventional accessing meansfor the hard disk, and also includes the accessing means for the harddisk has to be realized.

The present invention addresses the foregoing problems.

A storage apparatus in accordance with the present invention at leastincludes flash memories in which data is stored and a storage controllerthat controls the storage apparatus. A host computer that issues aninput/output request, a management computer that manages a storagesystem, and a second storage apparatus including a magnetic disk areconnected to the storage apparatus. The flash memories are mounted in aflash memory package (substrate), and can be added to the storageapparatus in units of a flash memory module or a flash memory package.When a logical volume that is a storage area in which data such as anoperating system (OS) which runs in the host computer is stored has tobe created, the storage controller may form the storage area using theflash memory in the flash memory package incorporated in the storageapparatus. According to the technology described in the patent document1, the storage area may be realized using a storage area formed with themagnetic disk incorporated in the second storage apparatus. When aninput/output request is issued from the host computer, if the storagearea is formed using the flash memory incorporated in the storageapparatus, the storage controller directly accesses the flash memory soas to handle the input/output request. If the storage area is formedusing the magnetic disk incorporated in the second storage apparatus, anaccessing means for a magnetic disk such as an SCSI command is used tohandle the input/output request. When the storage area formed with theflash memory is defined in the storage apparatus, the storage capacityof the storage area to be provided for the host computer and asubstitute area capacity determined in consideration of restrictionsimposed on the number of times of deletion of the flash memory aresummed up. At this time, usage signifying to what application thestorage area is allocated may be designated in order to release astorage manager from inputting the substitute area capacity. When thestorage area formed with the flash memory is defined, the substitutearea capacity may be calculated based on the writing access frequencyfor the storage area that is formed with the hard disk drive and has arelationship of a copy mate with the storage area.

According to the present invention, since flash memories areincorporated in a storage apparatus while being mounted in a flashmemory package, high-density mounting of flash memories can be achieved.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows an example of the configuration of a computer system inwhich the present invention is employed;

FIG. 2 shows an example of the detailed configuration of a storageapparatus ST1 of an embodiment 1 in accordance with the presentinvention;

FIG. 3 shows an example of a logical device table installed in thestorage apparatus ST1 of the embodiment 1 in accordance with the presentinvention;

FIG. 4 shows an example of an internal device table installed in astorage apparatus ST1 of the embodiment 1 or 2 in accordance with thepresent invention;

FIG. 5 shows an example of an external device table installed in thestorage apparatus ST1 of the embodiment 1 or 2 in accordance with thepresent invention;

FIG. 6 shows an example of a cache allocation table installed in thestorage apparatus ST1 of the embodiment 1 or 2 in accordance with thepresent invention;

FIG. 7 shows an example of a flash memory package table installed in thestorage apparatus ST1 of the embodiment 1 or 2 in accordance with thepresent invention;

FIG. 8 is a flowchart describing the contents of processing to beperformed by a device management program that is run by the storageapparatus ST1 of the embodiment 1 or 2 in accordance with the presentinvention;

FIG. 9 shows an example of an internal device creation screen image tobe displayed by a management computer while the device managementprogram is being run by the storage apparatus ST1 of the embodiment 1 inaccordance with the present invention;

FIG. 10 shows an example of a logical device list display screen imageto be displayed by the management computer while the device managementprogram is being run by the storage apparatus ST1 of the embodiment 1 or2 in accordance with the present invention;

FIGS. 11A-11B are flowcharts describing the contents of processing to beperformed by an input/output control program that is by the storageapparatus ST1 of the embodiment 1 or 2 in accordance with the presentinvention;

FIG. 12 shows an example of a usage-based substitute area capacity tableinstalled in the storage apparatus ST1 of the embodiment 1 or 2 inaccordance with the present invention;

FIG. 13 is a flowchart describing the contents of processing to beperformed by an internal device configuration program that is run by thestorage apparatus ST1 of the embodiment 1 in accordance with the presentinvention;

FIG. 14 shows an example of the detailed configuration of the storageapparatus ST1 of the embodiment 2 in accordance with the presentinvention;

FIG. 15 shows an example of a logical device table installed in thestorage apparatus ST1 of the embodiment 2 in accordance with the presentinvention;

FIG. 16 shows an example of an internal device creation screen image tobe displayed by the management computer while the device managementprogram is being run by the storage apparatus ST1 of the embodiment 2 inaccordance with the present invention;

FIG. 17 is a flowchart showing the contents of processing to beperformed by the internal device configuration program that is run bythe storage apparatus ST1 of the embodiment 2 in accordance with thepresent invention;

FIG. 18 shows an example of expressions to be employed in the internaldevice configuration program that is run by the storage apparatus ST1 ofthe embodiment 2 in accordance with the present invention; and

FIG. 19 shows an example of the configuration of a computer systemincluding a variant of the embodiment 1 or 2 in accordance with thepresent invention.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

Referring to the drawings, embodiments of the present invention will bedescribed below. Noted is that the present invention will not be limitedto the embodiments.

Embodiment 1

In the present embodiment, a storage apparatus in which a flash memoryis incorporated while being mounted in a flash memory package and whichis connected to a conventional storage apparatus having a magnetic diskincorporated therein can handle an input/output request through bothdirect access to the flash memory and access to the conventionalmagnetic disk.

(1-1) Configuration of a Computer System in which the Embodiment 1 isEmployed

The configuration of a computer system in which the embodiment 1 isemployed will be described below. FIG. 1 and FIG. 2 show theconfiguration of the computer system and the configuration of anapparatus included in the computer system. FIG. 3 to FIG. 7 show piecesof management information to be installed in apparatus.

FIG. 1 shows the configuration of the computer system. One or more hostcomputers 10000, a storage apparatus 30000 in which a flash memory to bedescribed later is incorporated, and one or more storage apparatuses40000 in which a hard disk to be described later is incorporated areinterconnected over a storage network 20000. Moreover, the storageapparatuses 30000 and 40000 are connected to a management computer 50000over a management network 60000.

The detailed configuration of the host computer 10000 will be describedbelow. The host computer 10000 includes a central processing unit (CPU)11000, a memory 12000, one or more input/output ports 13000 throughwhich the host computer is connected to the storage network 20000, anoutput unit 16000 that outputs the results of processing such as adisplay device, and an input unit 15000 such as a keyboard and a mouse.These components are interconnected over an internal bus 14000. Anoperating system (not shown), and an application (not shown) thatperforms processing accompanied by data access to be gained to thestorage apparatus reside in the memory 12000. These programs are loadedfrom a storage medium (not shown) such as a hard disk. The CPU 11000shall reference the programs.

The storage apparatus 30000 includes an input/output port 31000, astorage controller 32000, flash memory packages 33000 in which a flashmemory is mounted, a cache memory 34000, and a management port 35000through which the storage apparatus is connected to the managementnetwork 60000. An example of the detailed configuration will bedescribed later.

The storage apparatus 40000 includes an input/output port 41000, astorage controller 42000, hard disks 43000, a cache memory 44000, and amanagement port 45000. For brevity's sake, the storage apparatus 40000employed in the present invention shall be an apparatus that provides astorage area in the hard disk 43000 of the storage apparatus 40000 as astorage area of the storage apparatus 30000 according to the technologydescribed in the patent document 1. Since the storage apparatus 40000performs the same input/output processing as the conventional storageapparatus does, an iterative description will be omitted.

The detailed configuration of the management computer 50000 will bedescribed. The management computer 50000 includes a CPU 51000, a memory52000, a management port 53000, an output unit 56000 that outputs theresults of processing such as a display device, and an input unit 55000such as a keyboard and a mouse. These components are interconnected overan internal bus 54000. The management computer 50000 loads a programinto the memory 52000 thereof through communication with a storagemedium (not shown) such as a hard disk or the storage apparatus 30000 or40000, and runs the program so as to execute operational management forthe storage apparatus 30000 or 40000. Moreover, the operating system(OS) is loaded from the storage medium into the memory 52000, though itis not shown. The CPU 51000 runs the programs.

The storage network 20000 linking the host computers and storageapparatuses and interconnecting the storage apparatuses may be realizedwith a switch or direct connections among the apparatuses.

For convenience' sake, in the embodiment 1, the host computer shall beconnected to the storage apparatuses ST1 and ST2 over the storagenetwork. Moreover, the storage network 20000 shall be a network based onthe Fibre Channel (FC) protocol, and the management network 60000 shallbe a network based on the IP protocol.

FIG. 2 shows an example of the detailed configuration of the storageapparatus 30000. The storage apparatus 30000 includes one or moreinput/output ports 31000, a storage controller 32000, one or more flashmemory packages 33000 in each of which flash memory modules 33100 aremounted, a cache memory 34000, and a management port 35000 through whichthe storage apparatus is connected to the management network 60000.These components are interconnected via the storage controller 32000.

A microprogram (not shown) that controls the components of the storageapparatus resides in the storage controller 32000. Based on thetechnology disclosed in the patent document 1, a storage area in thestorage apparatus 40000 can be recognized as an external device (EXDEV)and provided as a logical device (LDEV) for the host computer 10000.Further installed in the storage controller 32000 are: a logical devicetable (LDEV TBL) 32100 to be used to manage logical devices; an internaldevice table (INDEV TBL) 32200 to be used to manage internal devices(INDEV) that are storage areas formed with the flash memory modules inthe flash memory packages to be described later; an external devicetable (EXDEV TBL) 32300 to be used to manage external devices; a cacheallocation table (CM TBL) 32400 to be used to manage cache-memorystorage situations of data items retrieved into partial areas of logicaldevices; a flash memory package table (FPK TBL) 32500 to be used tomanage flash memory packages; a device management program (DEVmanagement PG) 32600 to be used to manage allocations of devices orstates thereof; an input/output control program (I/O control PG) 32700to be used to control pieces of input/output processing performed onlogical devices; a usage-based substitute area capacity table (USAGETBL) 32800 to be used to define substitute area capacities associatedwith usages of internal devices to be described later; and an internaldevice configuration program (INDEV PG) 32900 to be invoked when thedevice management program 32600 configures an internal device. Theseprograms are loaded from a storage medium such as a hard disk, which isincorporated in the storage controller, into a memory and then executedby the CPU.

The flash memory package (FPK) 33000 is a substrate having one or moreflash memory modules (FM) 33100 mounted thereon. What is referred to asthe flash memory module (FM) 33100 is a printed circuit board on whichmultiple flash memory chips are mounted, and is shaped like, forexample, a dual inline memory module (DIMM). The device managementprogram 32600 to be described later creates an internal device bycombining a flash memory package and a flash memory module so as to meeta storage capacity designated by a storage manager, and stores datawhile dispersing it according to the RAID technology.

For convenience's sake, the number of input/output ports 31000 is two ofinput/output ports P11 and P12. The input/output port P11 is used toconnect the storage apparatus to the host computer, and the input/outputport P12 is used to connect the storage apparatus to the storageapparatus ST2. Moreover, the number of flash memory packages 33000 isfour, and each of the flash memory packages 33000 has n flash memorymodules (where n denotes an integer equal to or larger than 2) of astorage capacity of 256 G bytes mounted therein.

FIG. 3 shows an example of the logical device table 32100 installed inthe storage apparatus ST1.

FIG. 3 shows the table which the storage apparatus ST1 uses to managelogical devices. The logical device table 32100 includes: a field 32110in which a logical device ID that is an identifier unique to a logicaldevice in the storage apparatus ST1 is registered; a field 32120 inwhich a host recognizable capacity of a logical device to be providedfor the host computer is registered; a device ID field 32130 in whichwhether a storage area corresponding to a logical device is formed withan internal device or an external device is specified; a state field32140 in which whether a logical device has been allocated to the hostcomputer is specified; and a field 32150 in which when a logical devicehas been allocated to the host computer, a host connection destinationinput/output port number, an SCSI target ID, or an SCSI logical unitnumber is registered.

In the state field 32140, when a logical device has already beenallocated to the host computer, Allocated is registered. When thelogical device has not been allocated to the host computer, Unallocatedis registered. When the logical device has not been allocated to thehost computer, Not Applicable (N/A) is registered in the portnumber/target ID/logical unit number field 32150.

FIG. 4 shows an example of the internal device table 32200 installed inthe storage apparatus ST1.

FIG. 4 shows the table which the storage apparatus ST1 uses to manageinternal devices. The internal device table 32200 includes a field 32210in which an internal device ID that is an identifier unique to aninternal device in the storage apparatus ST1 is registered, a field32220 in which a basic capacity of an internal device to be describedlater is registered, a field 32230 in which a substitute area capacityof a substitute area to be preserved by an internal device isregistered, a field 32240 in which when an internal device has alreadybeen allocated as a logical device, the logical device ID is registered,a field 32250 in which a RAID configuration adopted for an internaldevice is specified, a field 32260 in which a stripe size of data to bestored in an internal device is specified, a field 32270 in which aflash memory package realizing an internal device is registered, a field32280 in which a flash memory module in a flash memory package realizingan internal device is registered, and a field 32290 in which an addressspace association list relevant to an internal device to be describedlater is registered.

Now, a basic capacity and a substitute area capacity will be describedbelow. Updating each bit in a flash memory is limited to one directionfrom 1 to 0 (or from 0 to 1). If reverse updating is required, a blockin a flash memory chip (which will be called a memory block) is deletedin order to set the entire memory block into 1s (or 0s). Moreover,restrictions are imposed on the number of times of deletion (an upperlimit of the number of times of deletion). For example, in the case of aNAND flash memory, the upper limit of the number of times of deletionranges from ten thousand times to one hundred thousand times.Consequently, when a flash memory is connected to a computer as asubstitute for a hard disk, the number of times of deletion performed onpart of memory blocks may reach the upper limit because of a variance ina writing frequency among the memory blocks, and the flash memory maynot be able to be used. For example, in a typical file system, since amemory block allocated to a directory and an inode is higher in arewriting frequency than the other memory blocks, the possibility thatthe number of times of deletion performed on the memory block may reachthe upper limit is high. Consequently, a memory block (substitute memoryblock) that substitutes for the memory block which cannot be used anylonger (defective memory block) is allocated in order to extend theservice life of an internal device. The basic capacity refers to astorage capacity required for providing a host recognizable capacity.Incidentally, the basic capacity includes a parity data storage capacitydependent on a RAID configuration that will be described later.Therefore, the basic capacity may not square with the host recognizablecapacity. For example, in the case of the internal device IN01 shown inFIG. 4, the basic capacity is 768 G bytes. However, since theRAID5(3D+1P) configuration to be described later is adopted, the hostrecognizable capacity comes to 576 G bytes that is 75% of 768 G bytesand is equal to the host recognizable capacity of the logical deviceL01. The substitute area capacity refers to the storage capacity of astorage area to be preserved as a substitute memory block. Assuming thatthe same RAID configuration as that based on which the basic capacity isdefined is adopted, the substitute area capacity is defined as a storagecapacity including the parity data storage capacity.

Moreover, in the stripe size field 32260, a memory block length may bedefined. For convenience' sake, the memory block length of the flashmemory modules in all flash memory packages shall be 256K bytes.

In the associated flash memory package field 32270, FPKn-m (where n andm denote integers that are equal to or larger than 1 and satisfy n≧m)signifies that flash memory packages FPKn to FPKm are employed. In thepresent invention, the storage apparatus ST1 has four flash memorypackages FPK1 to FPK4 incorporated therein. In the case of the internaldevice IN01 in FIG. 4, since FPK1-4 is specified, all the four flashmemory packages FPK1 to FPK4 are employed. Moreover, in the associatedflash memory module number field 32280, an integer k equal to or largerthan 1 is registered. The integer indicates that the k-th flash memorymodule in the flash memory package specified in the associated flashmemory package field is employed. These two fields informs that, forexample, in the case of the internal device IN01 in FIG. 4, the flashmemory module FM1-1 of the flash memory package FPK1, the flash memorymodule FM2-1 of the flash memory package FPK2, the flash memory moduleFM3-1 of the flash memory package FPK3, and the flash memory moduleFM4-1 of the flash memory package FPK4 are employed. In the RAIDconfiguration field 32250, a RAID configuration the storage apparatusST1 can support is registered. For example, RAID5(3D+1P) signifies thatdata is stored while being striped into three flash memory packages outof the four flash memory packages (3D is specified), and one flashmemory package is used to store parity data (+1 P is specified).

The address space association list field 32290 indicates a relationshipof association between an address of data in an internal device havingthe host recognizable capacity and a memory block in a flash memorymodule in which the data is stored. Specifically, in the case of theinternal device IN01 shown in FIG. 4, the first element in the listfield “0 to 768 kB, FM1-#1” signifies that data items at addresses 0 to768 KB are stored in the first memory blocks of the first flash memorymodules of the respective flash memory packages (that is, flash memorymodules FM1-1, FM2-1, FM3-1, and FM4-1). The second element in the listfield “768 KB to 1536 KB, FM1-#850” signifies that data items ataddresses 768 KB to 1536 KB in the internal device are stored in the850th memory blocks of the first flash memory modules of the respectiveflash memory packages.

FIG. 5 shows an example of the external device table 32300 installed inthe storage apparatus ST1.

FIG. 5 shows the table which the storage apparatus ST1 uses to manageexternal devices. The external device table 32300 includes a field 32310in which an external device ID that is an identifier unique to anexternal device in the storage apparatus ST1 is registered, a field32320 in which a host recognizable capacity of an external device to beprovided for the host computer is registered, a field 32330 in which alogical device ID formed with an external device is specified, a field32340 in which an input/output port through which the storage apparatusST1 accesses an external device is specified, a field 32350 in which adevice ID is specified as identification information of an externaldevice, a field 32360 in which a logical device ID is specified, and afield 32370 in which a connection destination I/O port number of thestorage apparatus ST1, an SCSI target ID, or an SCSI logical unit numberis registered.

Numerical values specified in the fields 32350, 32360, and 32370relating to storage identification information can be acquired byissuing an SCSI inquiry command from the storage apparatus ST1 to anexternal device concerned.

FIG. 6 shows an example of the cache memory table 32400 installed in thestorage apparatus ST1.

FIG. 6 shows the table which the storage apparatus ST1 uses to managecache memory allocated states. The total capacity 32460 of the cachememory is utilized while being segmented in units of a block. The blocklength is registered in a field 32450. The block length 32450 may be afixed value to which the storage apparatus is set based on, for example,a memory block length adopted for flash memories incorporated in thestorage apparatus or on a RAID configuration, or may be able to bedefined by a storage manager. In the present invention, the cache memorycapacity is 512 G bytes, and the storage apparatus ST1 uses four flashmemory modules, for which a memory block length of 256K bytes isadopted, to implement a RAID configuration. The cache block length istherefore set to 1024K bytes. Consequently, the number of cache blocksis 512, and records on the respective blocks exist. Each record isstructured to have a block ID field 32410 to be used to uniquelyidentify a cache block, a field 32420 in which a cache state isspecified, a field 32430 in which a logical device as which the cachememory is allocated is specified, and a field 32440 in which addressesas which the cache memory is allocated is specified.

The state field 32420 specifies a Clean state in which data in the cachememory squares with data stored in an internal device or externaldevice, a Dirty state in which data in the cache memory is updated butis not yet reflected on data in an internal device or external device,or a Not Used state in which the cache block is not yet allocated. Inthe Not Used state, Not Applicable (N/A) is registered in the associatedlogical device ID field 32430 and logical device address field 32440.

FIG. 7 shows an example of the flash memory package table 32500installed in the storage apparatus ST1.

FIG. 7 shows the table which the storage apparatus ST1 uses to manageuse states of flash memory packages. The flash memory package table32500 includes a field 32510 in which an ID with which a flash memorypackage can be uniquely identified is registered, a field 32520 in whichan ID with which a flash memory module in each flash memory package canbe uniquely identified is registered, a field 32530 in which thecapacity of each flash memory module is specified, a field 32540 inwhich the address of each flash memory module is specified, a field32550 in which the use state of a flash memory block specified in theaddress field 32540 is specified, a field 32560 in which an internaldevice allocated as a flash memory block specified in the address field32540 is specified, and a field 32570 in which the rewriting frequencyby which an address is rewritten is specified.

The state field 32550 specifies Used which signifies that a flash memoryblock is used, or Not Used which signifies that the flash memory blockis unused.

When Not Used is specified, Not Applicable (N/A) is registered in theallocated internal device ID field 32560 and rewriting frequency field32570. The rewriting frequency field is used to provide an indexindicating based on the ratio to the rewriting permissible frequency,which is defined for each flash memory module, how many flash memoryblocks may become defective.

The configuration of the computer system in the embodiment 1 is employedhas been described so far.

(1-2) Processing Relevant to a Logical Device in the Storage ApparatusST1 of the Embodiment 1

Next, processing to be performed by the storage apparatus ST1 of thepresent embodiment will be described below. The processing isimplemented by the device management program 32600, input/output controlprogram 32700, and internal device program 32900 installed in thestorage apparatus ST1 30000.

The device management program 32600 is a program that implements theprocessing of recognizing an external device and registering it as alogical device, and the processing of creating an internal device andregistering it as a logical device. The input/output control program32700 is a program that controls input/output processing which a hostcomputer performs on a logical device. The internal device program 32900is a program that creates an internal device and registers it as alogical device.

Flowcharts describing the programs will be presented below. Unlessotherwise noted, the steps in each program shall be executed by thestorage controller 32000 of the storage apparatus ST1.

FIG. 8 is the flowchart describing the device management program 32600.

To begin with, the management computer instructs the storage apparatusST1 to recognize external devices (step S32610). Specifically, logicaldevices are created using the storage apparatus ST2, and connections areestablished so that the logical devices can be recognized through theinput/output port of the storage apparatus ST1. Through which of theinput/output ports the external devices should be recognized istransmitted to the storage apparatus ST1.

The storage apparatus ST1 having been designated the input/output portat step S32610 executes external device recognition (step S32620).Specifically, an SCSI inquiry command is issued through the designatedinput/output port. The external device table 32300 is produced based onthe results of the issuance, and transmitted to the management computer.Thereafter, the management computer designates external devices, whichwill be registered as logical devices, from among recognized externaldevices (step S32630). Specifically, external devices to be provided aslogical devices for a host computer are designated from among externaldevices created at step S32620, and the list of the external devices istransmitted to the storage apparatus ST1. At this time, allocation ofthe logical devices to the host computer may be designated.

The storage apparatus ST1 having been designated external devices to beregistered as logical devices at step S32630 executes logical deviceregistration (step S32640). Specifically, the logical device table 32100is produced by creating the entries of the designated external devices.If allocation of the logical devices to the host computer is designated,the state field 32140 and the port number/target ID/logical unit numberfield 32150 may be filled out. The storage apparatus ST1 transmits theresult of logical device registration and the result of allocation tothe host computer to the management computer.

The management computer displays the received logical device list (stepS32650). The contents of display will be described later.

The processing relating to recognition of external devices andregistration as logical devices has been described so far.

Next, the processing relating to creation of internal devices andregistration as logical devices will be described below.

To begin with, the management computer instructs the storage apparatusST1 to create internal devices (step S32660). Specifically, logicaldevice creation is instructed by designating a host recognizablecapacity, a substitute area capacity, and a RAID configuration. Thedetails will be given in conjunction with the contents of display.

The storage apparatus ST1 having designated a host recognizablecapacity, a substitute area capacity, and a RAID configuration at stepS32660 executes internal device creation (step S32670). Specifically,the internal device program 32900 to be described later is invoked.

The management computer displays a received list of logical devices(step S32650). The contents of display will be described later.

The device management program 32600 has been described in conjunctionwith the flowchart.

Next, the internal device configuration program 32900 shown in FIG. 13will be described below. For the description, an internal devicecreation screen image 70000 shown in FIG. 9 and the usage-basedsubstitute area capacity table 32800 shown in FIG. 12 are employed.

When the internal device program 32900 shown in FIG. 13 is executed atstep S32670 in the device management program 32600, the storageapparatus ST1 receives an internal device creation request from themanagement computer (step S91000).

The step S91000 in FIG. 13 will be described below. For this purpose, aninternal device creation screen image in FIG. 9 to be displayed by themanagement computer while the storage apparatus ST1 is running thedevice management program will be described below. The internal devicecreation screen image is a screen image through which parametersnecessary for determining internal devices are received from the storagemanager. The internal device creation screen image 70000 includes afield 70010 in which a host recognizable capacity is designated, a field70020 in which a substitute area capacity is designated, a field 70030in which a RAID configuration is designated, and a button 70050 to bedepressed in order to transmit an internal device creation command.Incidentally, the host recognizable capacity may not be designated but abasic capacity may be directly designated.

Referring back to step S91000 in FIG. 13, when the parameters shown inFIG. 9 are designated, the storage apparatus ST1 calculates the basiccapacity on the basis of the designated host recognizable capacity and

RAID configuration. For example, when the host recognizable capacity is576 G bytes and the RAID configuration is RAID5(3D+1P), the basiccapacity should be a four-thirds of the host recognizable capacity andis therefore 768 G bytes.

The step S91000 has been described so far.

Thereafter, in order to determine the substitute area capacity, thestorage apparatus ST1 decides whether the substitute area capacity hasbeen designated in the internal device creation screen image shown inFIG. 9 and whether usage has been designated therein (step S91010). Whenthe substitute area capacity has been designated, the designatedcapacity is used as it is, and the storage apparatus jumps to stepS91030. When usage has been designated, the storage apparatus jumps tostep S91020.

If it is found at step S91010 that usage has been designated, thestorage apparatus ST1 determines the substitute area capacity on thebasis of the usage (step S91020).

In order to describe the step S91030 in FIG. 13, a description will bemade of the usage-based substitute capacity table 32800 shown in FIG.12. The usage-based substitute capacity table is a table in which thestorage manager pre-defines the usage 32320 indicating an application orthe like that uses an internal device, and the substitute area capacity32330 per year required for the usage.

Referring to the step S91030 in FIG. 13, the usage-based substitutecapacity table is referenced to acquire the value entered in a logicaldevice usage field 70040 in the internal device creation screen imageshown in FIG. 9, and a value that is entered in a useful life span field70060 and signifies how many years an internal device to be created issupposed to be useful. The substitute area capacity is calculated byworking out the product of the value of the substitute area capacity32330 per year shown in FIG. 12 by the value in the useful life spanfield 70060 in relation to the usage indicated with the value in thelogical device usage field 70040. For example, when the usage for alogical device is a database and the useful life span is three years,the substitute area capacity per year for the usage “database” is 50 Gbytes. The substitute area capacity therefore comes to 150 G bytes.

The step S91020 has been described so far.

When the substitute area capacity is determined at step S91010 or stepS91020, the storage apparatus ST1 calculates the sum of the basiccapacity and the substitute area capacity and searches an allocableflash memory module (step S91030). For example, when the basic capacityis 768 G bytes and the substitute area capacity is 256 G bytes, the sumcomes to 1024 G bytes. For determining a memory block in the flashmemory module that offers the same capacity as the sum of 1024 G bytes,the capacities of areas for which Not Used is specified in the statefield 32550 are cumulated by referencing the flash memory package table32500 orderly from the leading flash memory module in each of flashmemory packages. In the example shown in FIG. 7, Used is specified forthe entire area in the first flash memory module of each flash memorypackage and for the leading 128 G bytes of the second flash memorymodule. Consequently, in order to preserve an area of 1024 G bytes long,the remaining 128 G bytes of the second flash memory module and theleading 128 G bytes of the third flash memory module should be utilized.Herein, an area is preserved by utilizing flash memory modules startingwith the leading flash memory module. A method of preserving an area maybe any other method.

Once an allocable flash memory module can be searched, the storageapparatus ST1 updates the internal device table and logical device table(step S91040). Specifically, Used is specified in the flash memorypackage table 32500 as the state of a memory block preserved at stepS91030, and a new ID is assigned as an assigned internal device ID.Based on the newly produced internal device ID, a new entry is createdin the internal device table 32200. In the new entry of the internaldevice table 32200, the basic capacity determined at step S91010, thesubstitute area capacity determined at step S91010 or step S91020, theRAID configuration determined at step S91010, and an associated flashmemory package and an associated flash memory module number which aredetermined at this step are registered. A specific value may beregistered as a stripe size. A new entry is created in the logicaldevice table 32100, and data items on a logical device are registered. Alogical device ID registered in the new entry of the logical devicetable 32100 is registered in the previously crated entry of the internaldevice table.

The step S91030 has been described so far.

Finally, the storage apparatus ST1 transmits the list of logicaldevices, in association with which newly created internal devices areregistered, to the management computer, and reports completion (stepS91050).

The internal device configuration program 32900 shown in FIG. 13 hasbeen described so far.

FIG. 10 shows an example of a logical device list display screen imageto be displayed by the management computer while the storage apparatusST1 is running the device management program.

The logical device list display screen image 80000 includes a field80010 in which a logical device ID is displayed, a field 80020 in whicha host recognizable capacity of a logical device to be provided for ahost computer is displayed, an associated device ID field 80030 whichindicates whether a storage area corresponding to a logical device isformed with an internal device or an external device, a state field80040 which indicates whether a logical device has already beenallocated to a host computer, and a field 80050 in which when thelogical device has already been allocated to the host computer, a hostconnection destination I/O port number, an SCSI target ID, or an SCSIlogical unit number is registered. In these fields, the values specifiedin the logical device table 32100 are displayed.

When a logical device is formed with an internal device, fieldsdescribed below may be displayed. Namely, the fields include a field80060 in which the basic capacity of the internal device is indicated, afield 80070 in which the substitute area capacity for the internaldevice is indicated, and a field 80080 in which the RAID configurationadopted for the internal device is indicated. In these fields, thevalues specified in the internal device table 32200 are displayed. Whenthe logical device is formed with an external device, Not Applicable(N/A) is displayed in the fields.

Moreover, a field 80090 in which when a logical device is formed with aninternal device, if a rewriting frequency pre-defined for flash memorypackages or flash memory modules constituting the internal device isexceeded, a warning signifying that there is a possibility that thenumber of defective blocks may be too large is indicated may be added.The rewriting frequency field 32570 in the flash memory package table32500 is cyclically monitored, and the warning is given to an internaldevice to be formed using a flash memory module whose rewritingfrequency has exceeded a predetermined frequency. The warning may notonly be displayed in a screen image but also be notified by mail oraccording to a simple network management protocol (SNMP) or accumulatedas a log such as a system log.

FIG. 11 is a flowchart describing the contents of processing to beperformed by the input/output control program that is run by the storageapparatus ST1.

To begin with, the storage apparatus ST1 receives an input/outputrequest from a host computer (step S90000). Specifically, the storageapparatus receives a Read or Write command that instructs reading orwriting from or in a certain logical device according to the SCSIstandard.

The storage apparatus ST1 having received the input/output requestdecides whether the request is a request for reading or writing data(step S90010). For reading, the storage apparatus jumps to step S90020.For writing, the storage apparatus jumps to step S90100.

If the request is found to be a request for reading at step S90010, thestorage apparatus ST1 interprets a reading destination address, anddecides whether data at the address is a cache hit (step S90020).Specifically, if any of all entries of the cache memory table has thevalues in the associated logical device ID field 32430 and logicaldevice address field 32440 squared with each other, a cache hit isdecided. If none of the entries of the cache table has the valuestherein squared with each other, a cache mishit is decided. In the caseof the cache hit, the storage apparatus jumps to step S90030. In thecase of the cache mishit, the storage apparatus jumps to step S90040.

If a cache hit is decided at step S90020, the cache data is read (stepS90030), and transferred to the host computer (step S90080). The storageapparatus then reports the host computer the fact that the datainput/output request has been handled (step S90090), and terminates theinput/output control program.

If a cache mishit is decided at step S90020, the storage apparatusdecides whether a logical device that is a data access destination isformed with an internal device or an external device (step S90040).Specifically, the associated device ID field 32130 of the logical devicetable 32100 is checked. If the logical device is formed with an internaldevice, the storage apparatus jumps to step S90050. If the logicaldevice is formed with an external device, the storage apparatus jumps tostep S90060.

If the logical device is decided to be formed with an internal device atstep 90040, data is read from the internal device (step S90050).Specifically, the associated flash memory package field 32270,associated flash memory module number field 32280, and address spaceassociation list field 32290 of the internal device table 32200 arechecked to see from what memory block of what flash memory module datashould be read. For example, when data of 512K bytes long is read fromthe internal device IN01 whose leading address is address 0, data of512K bytes long is read from memory blocks, which start with a memoryblock 1, of the first flash memory module (that is, the flash memorymodule FM1-1, FM2-1, FM3-1, or FM4-1) of each of the flash memorypackages FPK1 to FPK4. After data is read, the storage apparatusproceeds to step S90070.

If the logical device is decided to be formed with an external device atstep 90040, data is read from the external device (step S90060).Specifically, the initiator port ID field 32340 of the external devicetable 32300 is checked, and an SCSI Read command is issued to a logicaldevice designated in storage identification information. After data isread, the storage apparatus proceeds to step S90070.

After data is read at step S90050 or S90060, the cache memory isallocated to the read data and cache memory data is updated (stepS90070). Specifically, the cache memory table 32400 is referenced tocheck if Not Used is registered for any block. If such a block is found,the block is allocated and the data is updated. At this time, ifmultiple blocks are needed because the block size of a flash memory or ahard disk is different from the block size of the cache memory, multipleblocks are allocated. Moreover, if a block registered as Not Used cannotbe preserved in the cache memory, a block in a clean state may be usedinstead and allocated according to an arbitrary method. After cachememory allocation and data update are completed, the data is transferredto the host computer (step S90080). The host computer is reported thefact that the data input/output request has been handled (step S90090).The input/output control program is then terminated.

If the request is found to be a request for writing at step S90010, thestorage apparatus ST1 interprets a writing destination address, anddecides if data at the address is a cache hit (step S90100). Since theconcrete processing is identical to that of step S90020, an iterativedescription will be omitted. If the data is a cache hit, the storageapparatus jumps to step S90110. If the data is a cache mishit, thestorage apparatus jumps to step S90160.

If the data is found to be a cache hit at step S90100, the storageapparatus ST1 updates the cache memory with writing data (step S90110).Specifically, after data of a cache memory block is updated, the stateof the block is changed by specifying Dirty in the cache memory table32400. After step S90110 is completed, the host computer is reported thefact that the data input/output request has been handled (step S90120).In order to write data in an internal device or an external device so asto cancel the dirty state of the cache memory block, whether a logicaldevice that is a data access destination is formed with an internaldevice or an external device is decided (step S90130). Specifically, theassociated device ID field 32130 of the logical device table 32100 ischecked to make a decision. In case of an internal device, the storageapparatus jumps to step S90140. In case of an external device, thestorage apparatus jumps to step S90150.

If the data is found to be a cache mishit at step S90100, the storageapparatus ST1 allocates a cache memory block to writing data (stepS90170). Since the concrete processing is identical to cache allocationof step S90070, an iterative description will be omitted. After stepS90170 is completed, the host computer is reported the fact that a datainput/output request has been handled (step S90180). In order to storedata in a preserved cache memory block, Read Modify Write is executed inorder to read data from an access destination in an internal device oran external device into the cache memory block so as to then modify thedata with writing data sent from the host computer. For this purpose,whether a logical device that is the data access destination is formedwith an internal device or an external device is decided (step S90180).Specifically, the associated device ID field 32130 of the logical devicetable 32100 is checked to make a decision.

If a decision is made at step 90180 that the logical device is formedwith an internal device, data is read from the internal device (stepS90190). Since the concrete processing is identical to that of stepS90050, an iterative description will be omitted. Further, data read atstep S90190 is used to update the data in the cache memory block (stepS90200). The storage apparatus then jumps to step S90140.

If a decision is made at step 90180 that the logical device is formedwith an external device, data is read from the external device (stepS90210). Since the concrete processing is identical to that of stepS90060, an iterative description will be omitted. The data read at stepS90210 is used to update the data of the cache memory block (stepS90220). The storage apparatus then jumps to step S90150.

At step S90140, the storage apparatus ST1 writes data in the internaldevice so as to reflect the writing data, which has undergone ReadModify Write and has been stored in the cache memory block, on theinternal device. Specifically, the associated flash memory package field32270, associated flash memory module number field 32280, and addressspace association list field 32290 of the internal device table 32200are checked to see in what memory block of what flash memory module datashould be written. For example, in order to write data of 512K byteslong from the internal device IN01 with an internal device address 0regarded as a leading address, data of 512K bytes long is written inmemory blocks, which start with a memory block 1, of the first flashmemory module (that is, the flash memory module FM1-1, FM2-1, FM3-1, orFM4-1) of each of the flash memory packages FPK1 to FPK4. As for anothermethod, data may be written in a flash memory block preserved based on asubstitute area capacity, and the relationship of association in theaddress space association list field may be rewritten. In this case, theuse order of flash memory blocks specified in the address spaceassociation list field is not guaranteed but the rewriting frequenciesof the flash memory blocks can be smoothed out. The memory blocks can beprevented from being defective in an early stage, or in other words, theservice life of the flash memory package or flash memory module can beextended. After the step S90140 is completed, the storage apparatus ST1terminates the input/output control program.

At step S90150, the storage apparatus ST1 writes data in the externaldevice so as to reflect writing data, which has undergone Read ModifyWrite and has been stored in the cache memory block, on the externaldevice. Specifically, the initiator port ID field 32340 of the externaldevice table 32300 is checked, and, for example, an SCSI Write commandis issued to a logical device designated in storage identificationinformation. After step S90150 is completed, the storage apparatus ST1terminates the input/output control program.

The input/output control program 32700 has been described in conjunctionwith the flowchart.

Processing relating to a logical device in the storage apparatus ST1 ofthe embodiment 1 has been described so far.

According to the present embodiment, flash memories are incorporated ina storage apparatus while being mounted in flash memory packages, andany flash memory module can be directly accessed without use of anaccessing means for a magnetic disk. Moreover, when input/output requesthandling that uses the conventional magnetic disk accessing means isimplemented, an existing magnetic disk storage apparatus can be utilizedas it is.

The embodiment 1 has been described so far.

Embodiment 2

In the present embodiment, when an internal device that is a storagearea formed with a flash memory is defined, if the substitute areacapacity of the internal device is calculated based on the writingaccess frequency for a storage area that is realized with a hard diskdrive and has a relationship of a copy mate with the storage area, thedefinition of the internal device can be simplified.

In a description to be made of the embodiment 2, unless otherwise noted,the configuration of the embodiment 1 and the tables and programsinstalled therein are utilized. Differences from the embodiment 1 willbe described below.

(2-1) Configuration of a Computer System in which the Embodiment 2 isEmployed

The configuration of a computer system in which the embodiment 2 isemployed will be described below.

FIG. 14 shows the configuration of the computer system in which theembodiment 2 is employed. Differences from the embodiment 1 lie in thelarger number of entries of the logical device table 36000 and in theinternal device configuration program 36100. Specifically, processingrelating to a logical device in the storage apparatus ST1 of theembodiment 2 will be described later.

The configuration of the computer system in which the embodiment 2 isemployed has been described above.

(2-2) Processing Relating to a Logical Device in the Storage ApparatusST1 of the Embodiment 2

Processing to be performed by the storage apparatus ST1 of the presentembodiment will be described below. The processing is implemented by thedevice management program 32600, input/output control program 32700, andinternal device program 36100 installed in the storage apparatus ST130000. Since the device management program 32600 and input/outputcontrol program 32700 are identical to those of the embodiment 1, aniterative description will be omitted.

The logical device table 36000 and internal device program 36100 thatare different from those of the embodiment 1 will be sequentiallydescribed below.

FIG. 15 shows an example of the logical device table 36000 installed inthe storage apparatus ST1 of the embodiment 2.

A difference from the embodiment 1 lies in a point that the logicaldevice table includes an entry 32160 in which the writing accessfrequency for each logical device is held. The writing access frequencyrefers to the number of times by which the storage controller 32000 ofthe storage apparatus ST1 has received a Write command instructingwriting of data in a logical device (for example, an SCSI Write command)during a certain period of time. For example, the number of times ofWrite command reception per sec (input/output per second (IOPS)) may beheld, or the number of Write commands received during a monitoring timeof 1 min may be converted into an IOPS value. Further, a mean value ofprevious several IOPS values may be held, or a maximum or minimum valuethereof may be held. Further, a history of previous IOPS values may beheld, and a storage manager may be allowed to select any of IOPS valueat the time of calculating a substitute area capacity.

Next, the internal device configuration program 326100 mentioned in FIG.17 will be described below. For the description, an internal devicecreation screen image 71000 shown in FIG. 16 and the usage-basedsubstitute capacity table 32800 shown in FIG. 12 are employed.

Step S91000 is identical to that in the embodiment 1.

A difference of step S91010 from that in the embodiment 1 lies in apoint that if a substitute area capacity is not designated, the storageapparatus jumps to step S92000.

At step S91010, if a substitute area capacity is not designated, a matelogical device field 70070 and a useful life span field 70060 of theinternal device creation screen image 71000 shown in FIG. 16 are checkedto see if a useful life span has been designated (step S92000). If auseful life span has been designated, the storage apparatus jumps tostep S92010. If no useful life span has been designated, the storageapparatus jumps to step 92020 (step S92000).

Now, a mate logical device will be described below. What is referred toas the mate logical device is a logical device that is mated with theother logical device in order to implement data migration or data copybetween storage areas provided by a storage system composed of thestorage apparatuses ST1 and ST2 on the assumption of two cases describedbelow. The first case is a case where since the access frequency fordata stored in a logical device formed with a current external devicehas increased, migration is made to a logical device formed with aninternal device to which fast access can be gained in order to thusimprove the logical device performance. The second case is a case wheredata stored in a logical device formed with an external device or aninternal device is copied into another logical device formed with aninternal device in the storage apparatus ST1 in order to thus improvethe logical device availability. Thus, when information on a logicaldevice that is a mate is acquired, a substitute area capacity can becalculated in consideration of the writing access frequency for alogical device, which is a migration source or a copy source, at thetime of calculating the substitute area capacity at step S92010 to bedescribed later.

Referring back to FIG. 17, at step S92010, the storage apparatus ST1calculates a substitute area capacity on the basis of the writing accessfrequency for a designated mate logical device and the useful life spanthereof (step S92010). Specifically, expressions like those shown inFIG. 18 are employed.

The contents of the calculation indicated by the expressions in FIG. 18will be described below.

To begin with, the writing access frequency for a mate logical device isdivided by the number of comprehensive rewritings in order to work out aflash memory block rewriting frequency (W) for a newly created internaldevice. This is a value signifying how many times per sec a flash memoryblock can be rewritten on the assumption that: the writing accessfrequency is equivalent to the writing access frequency for the matelogical device; and comprehensive rewriting is performed so that theflash memory will be updated by updating the cache memory as long as thenumber of writings is retained at a certain number of writings.

Thereafter, a product of the flash memory block rewriting frequency W bya rewritten block length by a useful life span is calculated. Theproduct (W1) of these three values expresses a total written capacity ofthe newly created logical device by which the logical device is writtenduring the useful life span. As a rewriting frequency to be attainedduring the useful life span, the product of the flash memory blockrewriting frequency W by the useful life span is utilized. As alreadydescribed, the flash memory is deleted or overwritten in units of aflash memory block. Therefore, the product of the rewriting frequencyattained during the useful life span by the rewritten block length iscalculated in order to work out the W1 value.

Finally, the W1 value is divided by the upper limit of the number oftimes of rewriting in order to work out the substitute area capacity.This is intended to reduce the W1 value by reusing the same flash memoryblock. The result is multiplied by a conversion rate (10⁻⁶) in order toconvert a unit of kilobytes into a unit of gigabytes.

For example, assuming that the mate logical device is, as shown in FIG.16, the logical device L02 and the useful life span is three years, thesubstitute area capacity is calculated as mentioned below according tothe expressions shown in FIG. 18. Incidentally, the number ofcomprehensive rewritings shall be ten (that is, the results of tenwritings are comprehensively reflected on a flash memory block). Therewritten block length shall be 256K bytes and the upper limit of thenumber of times of rewriting shall be one hundred thousand times. Sincethe writing access frequency for the logical device L02 is found to be100 IOPS by referencing the logical device table 36000, the flash memoryblock rewriting frequency W comes to ten. Consequently, the totalwritten capacity W1 comes to 242716 G bytes through calculation of10×256×(3×3600×24×365) (the result is multiplied by the conversion rate(10⁻⁶) beforehand in order to convert kilobytes into gigabytes). Thedivision of the total written capacity W1 by the upper limit of thenumber of times of rewriting comes to approximately 24.3 G bytes.

The expressions in FIG. 18 have been described so far.

Referring back to FIG. 17, the substitute area capacity can becalculated at step S92010 according to the foregoing expressions.

If it is found at step S92000 that the mate logical device and usefullife span are not designated, a predetermined writing access frequencyand useful life span are used to calculate the substitute area capacityaccording to the expressions described in conjunction with FIG. 18 (stepS92020). Herein, the predetermined writing access frequency may be avalue designated by the storage manager or may be the value of thewriting access frequency for an arbitrary logical device, which iscreated by designating the same usage, among the logical devicesregistered in the logical device table.

The steps S91030, 91040, and 91050 are identical to those of theembodiment 1.

The internal device configuration program 32900 has been described inconjunction with FIG. 17.

Processing relating to a logical device in the storage apparatus ST1 ofthe embodiment 2 has been described so far.

According to the present embodiment, the definition of a substitute areacapacity can be simplified, and a storage area realized with a flashmemory can be utilized irrespective of presence or absence ofinformation on the flash memory.

The embodiment 2 has been described so far.

As variants of the present embodiment and embodiment 1, theconfiguration of the computer system may, as shown in FIG. 19, includeone storage apparatus ST1. At this time, the storage apparatus ST1 isdifferent from those of the embodiments 1 and 2 in points that: thestorage controller to which flash memory packages are connected managesinternal devices; the storage controller to which disk drives areconnected manages external devices; and the storage controllers areconnected to each other. An internal device creating method and alogical device handling method are identical to those of the embodiments1 and 2.

1. A method of allocating capacity in a storage system, the storagesystem including a controller and a plurality of flash packagesconnected to the controller, the method comprising: creating a logicaldevice provided to a host computer as a migration destination formigrating data in a migration source which is a logical devicerecognized by the host computer; and allocating to the created logicaldevice, at least a first storage area with a first capacity and a secondstorage area with a second capacity from storage area provide by theflash packages, the first capacity being a capacity which the hostrecognizes, the second storage area being provided as a substitute area,wherein the allocating includes calculating the second capacity based onwrite access frequency for the migration source.
 2. The method accordingto claim 1, wherein the second capacity is calculated based on both thewrite access frequency for the migration source and a useful life spanset for the created logical device.
 3. A method of allocating capacityin a storage system, the storage system including a controller and aplurality of flash packages connected the controller, the methodcomprising: creating a logical device provided to a host computer as acopy destination for copying data in a copy source which is a logicaldevice recognized by the host computer; and allocating to the createdlogical device, at least a first storage area with a first capacity andsecond storage area with a second capacity from storage area provide bythe flash packages, the first capacity being a capacity which the hostrecognizes, the second storage area being provided as a substitute area,wherein the allocating includes calculating the second capacity based onwrite access frequency for the copy source.
 4. The method according toclaim 2, wherein the second capacity is calculated based on both thewrite access frequency for the copy source and a useful life span setfor the created logical device.
 5. A system comprising: a first storagesystem including a first controller and a plurality of flash packagesconnected the first controller; and a second storage system coupled tothe first storage system, which includes a second controller and aplurality of hard disk drives connected to the second controller, thehard disk drives providing a logical device to a host computer, whereinthe first controller is configured to create a logical device providedto the host computer as a migration destination for migrating data inthe logical device provided by the hard disk drives, and allocate to thecreated logical device, at least a first storage area with a firstcapacity and second storage area with a second capacity from storagearea provide by the flash packages, the first capacity, being a capacitywhich the host recognizes, the second storage area being provided as asubstitute area, and wherein the second capacity is calculated based onwrite access frequency for the logical device provided by the hard diskdrives.
 6. The system according to claim 5, wherein the second capacityis calculated based on both the write access frequency for the logicaldevice provided by the hard disk drives and a useful life span set forthe created logical device.
 7. A system comprising: a first storagesystem including a first controller and a plurality of flash packagesconnected the first controller; and a second storage system coupled tothe first storage system, which includes a second controller and aplurality of hard disk drives connected the second controller, the harddisk drives providing a logical device to a host computer, wherein thefirst controller is configured to create a logical device provided tothe host computer as a copy destination for copying data in the logicaldevice provided by the hard disk drives, and allocate to the createdlogical device, at least a first storage area with a first capacity andsecond storage area with a second capacity from storage area provide bythe flash packages, the first capacity being a capacity which the hostrecognizes, the second storage area being provided as a substitute area,and wherein the second capacity is calculated based on write accessfrequency for the logical device provided by the hard disk drives. 8.The system according to claim 7, wherein the second capacity iscalculated based on both the write access frequency for the logicaldevice provided by the hard disk drives and a useful life span set forthe created logical device.